﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace IRemoting
{
    public enum HEADER
    {
    }

    public interface IRemote
    {
        bool Login(string username);
        void Logout(string username);
        void RegistryTransportProxy(string username, TransportProxy tp);
        void SendValuePrivate(HEADER header, object msg);
    }

    public delegate void Handler(HEADER header, object msg);

    public class TransportProxy : MarshalByRefObject
    {
        private Handler _transportHandler;
        public Handler TransportHandler
        {
            get { return _transportHandler; }
            set { _transportHandler = value; }
        }

        public void Transport(HEADER header, object msg)
        {
            TransportHandler(header, msg);
        }
    }
}
